
@echo off
setlocal enabledelayedexpansion

:: 获取当前工作目录的绝对路径
for /f %%A in ('cd') do set CURRENT_DIR=%%~fA

docker run -itd --name=db -e MYSQL_RANDOM_ROOT_PASSWORD=true  -e MYSQL_DATABASE=cosmic -e MYSQL_USER=cosmic_server -e MYSQL_PASSWORD=snailshell  -p 3307:3306  -v !CURRENT_DIR!/database/docker-db-data:/var/lib/mysql  -v !CURRENT_DIR!/database/sql:/docker-entrypoint-initdb.d   mysql:8.0.23
  

docker run -itd  --name maplestory -e DB_HOST=db -p 8484:8484 -p 7575-7577:7575-7577 -v !CURRENT_DIR!/config.yaml:/opt/server/config.yaml -v !CURRENT_DIR!/scripts:/opt/server/scripts  -v !CURRENT_DIR!/wz:/opt/server/wz   -e DB_HOST=db  cosmic_maplestory
pause